import 'package:flutter_taotaoshipin/generated/json/base/json_convert_content.dart';
import 'package:flutter_taotaoshipin/model/user_pay_log_list_entity.dart';

UserPayLogListEntity $UserPayLogListEntityFromJson(Map<String, dynamic> json) {
  final UserPayLogListEntity userPayLogListEntity = UserPayLogListEntity();
  final String? orderid = jsonConvert.convert<String>(json['orderid']);
  if (orderid != null) {
    userPayLogListEntity.orderid = orderid;
  }
  final String? status = jsonConvert.convert<String>(json['status']);
  if (status != null) {
    userPayLogListEntity.status = status;
  }
  final double? amount = jsonConvert.convert<double>(json['amount']);
  if (amount != null) {
    userPayLogListEntity.amount = amount;
  }
  final String? typeStr = jsonConvert.convert<String>(json['type_str']);
  if (typeStr != null) {
    userPayLogListEntity.typeStr = typeStr;
  }
  final int? ctime = jsonConvert.convert<int>(json['ctime']);
  if (ctime != null) {
    userPayLogListEntity.ctime = ctime;
  }
  return userPayLogListEntity;
}

Map<String, dynamic> $UserPayLogListEntityToJson(UserPayLogListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['orderid'] = entity.orderid;
  data['status'] = entity.status;
  data['amount'] = entity.amount;
  data['type_str'] = entity.typeStr;
  data['ctime'] = entity.ctime;
  return data;
}

extension UserPayLogListEntityExtension on UserPayLogListEntity {
  UserPayLogListEntity copyWith({
    String? orderid,
    String? status,
    double? amount,
    String? typeStr,
    int? ctime,
  }) {
    return UserPayLogListEntity()
      ..orderid = orderid ?? this.orderid
      ..status = status ?? this.status
      ..amount = amount ?? this.amount
      ..typeStr = typeStr ?? this.typeStr
      ..ctime = ctime ?? this.ctime;
  }
}